package exttable.testversioning.testversionview;

import exttable.testversioning.tablemodel.VersionViewerModel;

import javax.swing.*;

/**
 * Created by IntelliJ IDEA.
 * User: Admin
 * Date: Jun 17, 2010
 * Time: 10:10:50 AM
 * To change this template use File | Settings | File Templates.
 */
public class AnalysisVersionViewer {
    private JFrame frame;

    public AnalysisVersionViewer(VersionViewerModel model) throws Exception {
        frame = new JFrame();
        frame.setTitle(model.getData().toString());
        JTable table = new JTable(model);
        frame.add(new JScrollPane(table));
        frame.pack();
        frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    }

    void makeVisible() {
        frame.setVisible(true);
    }

}
